// import error from './error'
import MInput from '@/views/demo/from/MInput'
import {defineEmits, h, render} from 'vue'

export function alert(dom, modelValue) {
  const emit = defineEmits(['update:modelValue'])
  //1 创建虚拟domVNode
  // const VNode = h(error)
  const VNode = h(MInput,
      {
        data: modelValue,
        'onUpdate:modelValue': (value) => emit('update:data', value)
      })
  // // 准备挂在节点
  const container = document.createElement('div')
  // // document.
  dom.appendChild(container)
  // 渲染虚拟dom到真实dom
  render(VNode, container)
}
